//
//  SecurityCenterController.m
//  FengyuanXS
//
//  Created by 王冬 on 2020/7/27.
//  Copyright © 2020 王冬. All rights reserved.
//

#import "SecurityCenterController.h"
#import "ChangePhoneController.h"
#import "ChangePassController.h"
#import "ChangeBuTaMenController.h"
@interface SecurityCenterController ()
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;

@end

@implementation SecurityCenterController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"安全中心";
    self.tableView.tableFooterView = [UIView new];
    self.phoneLabel.text = [TokenManager getToken];
}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = NO;
    
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.row == 0) {
        ChangeBuTaMenController *phoneVC = [ChangeBuTaMenController loadStroyboard:[ChangeBuTaMenController new]];
               
               [self.navigationController pushViewController:phoneVC animated:YES];
    }
    if (indexPath.row == 1) {
        ChangePhoneController *phoneVC = [ChangePhoneController loadStroyboard:[ChangePhoneController new]];
        
        [self.navigationController pushViewController:phoneVC animated:YES];
        
    }
    if (indexPath.row == 2) {
        ChangePassController *phoneVC = [ChangePassController loadStroyboard:[ChangePassController new]];
              
        [self.navigationController pushViewController:phoneVC animated:YES];
    }
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
